<div class="layui-form layui-form-pane" id="cmdExec-div" style="height:72%">
    <div class="layui-form-item" style="display: flex">
        <label class="layui-form-label" style="width:145px">命令输入框</label>
        <div class="layui-inline layui-input-block" style="width:100%;margin-left:-1px">
           <select name="city" lay-verify="" lay-search lay-filter="cmdSelects" id="cmdlist">
                <option value="">请选择或输入一个命令</option>
		   </select> 
        </div>
        <div class="layui-inline" id="cmd-btn-div">
            <button class="layui-btn layui-btn-warm " id="cmdExec" style="background-color:#5FB878">开始执行</button>
        </div>
    </div>

    <div class="layui-form-item layui-form-text" style="height:100%;margin-top:-5px"> 
        <label class="layui-form-label">执行结果</label>
        <div class="layui-input-block" id="cmd-res-div" style="height:100%">
            <textarea placeholder="" class="layui-textarea" id="cmdResMsg" style="height:100%"></textarea>
        </div>
    </div>
</div>
<script type="text/javascript">
	layui.use(['table','layer','form','element'], function(){
		var form = layui.form;
		var $ = layui.jquery;
		var layer = layui.layer;
		
		var funcList = {
			"loadSelectData":function(){
				$.ajax({
			        url:"../../../setup/cmdList",
			        type:"get",
			        dataType:"json",
			        async: false,
			        success: function(data) {
				         $.each(data,function(key,value){
				         	$('#cmdlist').append("<option value=\""+value+"\">"+key+"</option>");
				         	
				         })
				         form.render('select');
			        }
				});
			}
		}
	    var func = funcList["loadSelectData"];
	    func();
	});
</script>
